package com.shu.driftbook.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.shu.driftbook.service.UserService;

public class userinfo extends ActionSupport {
 private String username;
 public String execute() throws Exception {
	 HttpServletRequest request=ServletActionContext.getRequest();
	 long nowreadcount,waitdriftcount;
	 nowreadcount=(long) request.getSession().getAttribute("nowreadcount");
	 waitdriftcount=(long) request.getSession().getAttribute("waitdriftcount");
	 if(nowreadcount>0)
		 return "1";
	 else
		 if(waitdriftcount==0)
			 return "0";
		 else 
			 return "3";
}
 



public String getUsername() {
	return username;
}


public void setUsername(String username) {
	this.username = username;
}
}
